#ifndef RENDERAREA_H
#define RENDERAREA_H


#include <QWidget>

class RenderArea : public QWidget
{
  Q_OBJECT
    
public:
  RenderArea(QWidget *parent = 0);
  void test();
  void printpage();

 protected:
  void paintEvent(QPaintEvent *event);

 private:
#define MAXNUM_OF_WORDS 1000
#define DEFAULT_DEGREE 100
#define MIN_DEGREE (float)DEFAULT_DEGREE/100	//never less than this value
#define MAX_DEGREE (float)DEFAULT_DEGREE*100	//never larger than this value
#define REMEMBERED_DEGREE (float)DEFAULT_DEGREE/10

  //store the words
  struct{
    struct {
      QString word, trans, phonetic, example;
      float degree;			//difficult degree of a word
    } words[MAXNUM_OF_WORDS];
    unsigned int num;			//total num of words
  }dict;
  
};  

#endif
